import request from '@/utils/request'

// 查询美团店铺列表
export function listShop(query) {
  return request({
    url: '/mt/shop/list',
    method: 'get',
    params: query
  })
}

// 查询美团店铺详细
export function getShop(id) {
  return request({
    url: '/mt/shop/' + id,
    method: 'get'
  })
}

// 新增美团店铺
export function addShop(data) {
  return request({
    url: '/mt/shop',
    method: 'post',
    data: data
  })
}

// 修改美团店铺
export function updateShop(data) {
  return request({
    url: '/mt/shop',
    method: 'put',
    data: data
  })
}

// 删除美团店铺
export function delShop(id) {
  return request({
    url: '/mt/shop/' + id,
    method: 'delete'
  })
}

// 导出美团店铺
export function exportShop(query) {
  return request({
    url: '/mt/shop/export',
    method: 'get',
    params: query
  })
}
//同步店铺数据
export function shopPull(data){
  return request({
    url:'/mt/shop/pull',
    method:'post',
    data:data
  })
}
//美团授权接口
export function mtAccredit(){
  return request({
    url:'/mt/authURL',
    method:'get',
  })
}
